package shapes.shapes2D.distribution 
{
	import flash.geom.Point;
	import flash.geom.Rectangle;
	/**
	 * @author Nicolas Barradeau
	 * http://en.nicoptere.net
	 */
	public class RandomDistribution
	{
		
		static public function distribute( rect:Rectangle, count:int = 100  ):Vector.<Point>
		{
			
			var points:Vector.<Point> = new Vector.<Point>();
			var i:int = count;
			while( i-- )
			{
				points.push( new Point( rect.x + Math.random() * rect.width, rect.y + Math.random() * rect.height ) );
			}
			return points;
			
		}
		
	}

}